package com.javafive;

import java.io.*;

public class Demo5 {
    public static void main(String[] args) throws Exception {
        String path="E:\\webWork\\javaKh62Demo\\src\\com\\javafive\\txt\\1.txt";
        String path2="E:\\webWork\\javaKh62Demo\\src\\com\\javafive\\txt\\2.txt";
        InputStream inputStream = new FileInputStream(path);
        OutputStream outputStream = new FileOutputStream(path2);
        byte[] bytes = new byte[1024];
        int lngth=-1;
        while((lngth=inputStream.read(bytes)) !=-1){
            outputStream.write(bytes);
        }

    }
}
